home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / necko / nsIMultiPartChannel.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  5KB  |  157 lines

  1. /*
  2.  * DO NOT EDIT.  THIS FILE IS GENERATED FROM nsIMultiPartChannel.idl
  3.  */
  4.  
  5. #ifndef __gen_nsIMultiPartChannel_h__
  6. #define __gen_nsIMultiPartChannel_h__
  7.  
  8.  
  9. #ifndef __gen_nsISupports_h__
  10. #include "nsISupports.h"
  11. #endif
  12.  
  13. /* For IDL files that don't want to include root IDL files. */
  14. #ifndef NS_NO_VTABLE
  15. #define NS_NO_VTABLE
  16. #endif
  17. class nsIChannel; /* forward declaration */
  18.  
  19.  
  20. /* starting interface:    nsIMultiPartChannel */
  21. #define NS_IMULTIPARTCHANNEL_IID_STR "ba78db7b-b88c-4b76-baf9-3c2296a585ae"
  22.  
  23. #define NS_IMULTIPARTCHANNEL_IID \
  24.   {0xba78db7b, 0xb88c, 0x4b76, \
  25.     { 0xba, 0xf9, 0x3c, 0x22, 0x96, 0xa5, 0x85, 0xae }}
  26.  
  27. /**
  28.  * An interface to access the the base channel 
  29.  * associated with a MultiPartChannel.
  30.  */
  31. class NS_NO_VTABLE nsIMultiPartChannel : public nsISupports {
  32.  public: 
  33.  
  34.   NS_DEFINE_STATIC_IID_ACCESSOR(NS_IMULTIPARTCHANNEL_IID)
  35.  
  36.   /**
  37.      * readonly attribute to access the underlying channel
  38.      */
  39.   /* readonly attribute nsIChannel baseChannel; */
  40.   NS_IMETHOD GetBaseChannel(nsIChannel * *aBaseChannel) = 0;
  41.  
  42.   /**
  43.      * Access to the Content-Disposition header field of this part of
  44.      * a multipart message.  This allows getting the preferred
  45.      * handling method, preferred filename, etc.  See RFC 2183.
  46.      */
  47.   /* attribute ACString contentDisposition; */
  48.   NS_IMETHOD GetContentDisposition(nsACString & aContentDisposition) = 0;
  49.   NS_IMETHOD SetContentDisposition(const nsACString & aContentDisposition) = 0;
  50.  
  51.   /**
  52.      * Attribute guaranteed to be different for different parts of
  53.      * the same multipart document.
  54.      */
  55.   /* readonly attribute PRUint32 partID; */
  56.   NS_IMETHOD GetPartID(PRUint32 *aPartID) = 0;
  57.  
  58.   /**
  59.      * Set to true when onStopRequest is received from the base channel.
  60.      * The listener can check this from its onStopRequest to determine
  61.      * whether more data can be expected.
  62.      */
  63.   /* readonly attribute boolean isLastPart; */
  64.   NS_IMETHOD GetIsLastPart(PRBool *aIsLastPart) = 0;
  65.  
  66. };
  67.  
  68. /* Use this macro when declaring classes that implement this interface. */
  69. #define NS_DECL_NSIMULTIPARTCHANNEL \
  70.   NS_IMETHOD GetBaseChannel(nsIChannel * *aBaseChannel); \
  71.   NS_IMETHOD GetContentDisposition(nsACString & aContentDisposition); \
  72.   NS_IMETHOD SetContentDisposition(const nsACString & aContentDisposition); \
  73.   NS_IMETHOD GetPartID(PRUint32 *aPartID); \
  74.   NS_IMETHOD GetIsLastPart(PRBool *aIsLastPart); 
  75.  
  76. /* Use this macro to declare functions that forward the behavior of this interface to another object. */
  77. #define NS_FORWARD_NSIMULTIPARTCHANNEL(_to) \
  78.   NS_IMETHOD GetBaseChannel(nsIChannel * *aBaseChannel) { return _to GetBaseChannel(aBaseChannel); } \
  79.   NS_IMETHOD GetContentDisposition(nsACString & aContentDisposition) { return _to GetContentDisposition(aContentDisposition); } \
  80.   NS_IMETHOD SetContentDisposition(const nsACString & aContentDisposition) { return _to SetContentDisposition(aContentDisposition); } \
  81.   NS_IMETHOD GetPartID(PRUint32 *aPartID) { return _to GetPartID(aPartID); } \
  82.   NS_IMETHOD GetIsLastPart(PRBool *aIsLastPart) { return _to GetIsLastPart(aIsLastPart); } 
  83.  
  84. /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
  85. #define NS_FORWARD_SAFE_NSIMULTIPARTCHANNEL(_to) \
  86.   NS_IMETHOD GetBaseChannel(nsIChannel * *aBaseChannel) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBaseChannel(aBaseChannel); } \
  87.   NS_IMETHOD GetContentDisposition(nsACString & aContentDisposition) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentDisposition(aContentDisposition); } \
  88.   NS_IMETHOD SetContentDisposition(const nsACString & aContentDisposition) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetContentDisposition(aContentDisposition); } \
  89.   NS_IMETHOD GetPartID(PRUint32 *aPartID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPartID(aPartID); } \
  90.   NS_IMETHOD GetIsLastPart(PRBool *aIsLastPart) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetIsLastPart(aIsLastPart); } 
  91.  
  92. #if 0
  93. /* Use the code below as a template for the implementation class for this interface. */
  94.  
  95. /* Header file */
  96. class nsMultiPartChannel : public nsIMultiPartChannel
  97. {
  98. public:
  99.   NS_DECL_ISUPPORTS
  100.   NS_DECL_NSIMULTIPARTCHANNEL
  101.  
  102.   nsMultiPartChannel();
  103.  
  104. private:
  105.   ~nsMultiPartChannel();
  106.  
  107. protected:
  108.   /* additional members */
  109. };
  110.  
  111. /* Implementation file */
  112. NS_IMPL_ISUPPORTS1(nsMultiPartChannel, nsIMultiPartChannel)
  113.  
  114. nsMultiPartChannel::nsMultiPartChannel()
  115. {
  116.   /* member initializers and constructor code */
  117. }
  118.  
  119. nsMultiPartChannel::~nsMultiPartChannel()
  120. {
  121.   /* destructor code */
  122. }
  123.  
  124. /* readonly attribute nsIChannel baseChannel; */
  125. NS_IMETHODIMP nsMultiPartChannel::GetBaseChannel(nsIChannel * *aBaseChannel)
  126. {
  127.     return NS_ERROR_NOT_IMPLEMENTED;
  128. }
  129.  
  130. /* attribute ACString contentDisposition; */
  131. NS_IMETHODIMP nsMultiPartChannel::GetContentDisposition(nsACString & aContentDisposition)
  132. {
  133.     return NS_ERROR_NOT_IMPLEMENTED;
  134. }
  135. NS_IMETHODIMP nsMultiPartChannel::SetContentDisposition(const nsACString & aContentDisposition)
  136. {
  137.     return NS_ERROR_NOT_IMPLEMENTED;
  138. }
  139.  
  140. /* readonly attribute PRUint32 partID; */
  141. NS_IMETHODIMP nsMultiPartChannel::GetPartID(PRUint32 *aPartID)
  142. {
  143.     return NS_ERROR_NOT_IMPLEMENTED;
  144. }
  145.  
  146. /* readonly attribute boolean isLastPart; */
  147. NS_IMETHODIMP nsMultiPartChannel::GetIsLastPart(PRBool *aIsLastPart)
  148. {
  149.     return NS_ERROR_NOT_IMPLEMENTED;
  150. }
  151.  
  152. /* End of implementation class template. */
  153. #endif
  154.  
  155.  
  156. #endif /* __gen_nsIMultiPartChannel_h__ */
  157.